![]() |
Sniper / Gun - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Requests (https://forum.cuberite.org/forum-3.html) +--- Thread: Sniper / Gun (/thread-2302.html) |
RE: Sniper / Gun - JuliB - 01-08-2016 Sounds good! Which articles in the API should I read? The rest works 1A ![]() ![]() RE: Sniper / Gun - NiLSPACE - 01-08-2016 What do you mean? Does the snowball go to the left or the right? If you mean it's going down then try this: local EntityId = World:CreateProjectile(...) World:DoWithEntityById(EntityId, function(a_Projectile) a_Projectile:SetGravity(0) end ) RE: Sniper / Gun - JuliB - 01-09-2016 Good Idea to set the gravity down, but the problem is more difficult! The snowball is pull in 4 directions between the big sky directions (N E S W). That means the ball flies to nordeast nordwest southeast and southwest. If I shoot between two directions ( nordeast and nordwest -> nord) the ball flies right. Is that a vector issue ? RE: Sniper / Gun - NiLSPACE - 01-09-2016 That's strange. Could you give us your code? RE: Sniper / Gun - JuliB - 01-09-2016 http://pastebin.com/nLEy5kRV Whole code RE: Sniper / Gun - NiLSPACE - 01-09-2016 The only thing I can think of i that you set the LookVector way too high. Perhaps try to lower it. RE: Sniper / Gun - JuliB - 01-09-2016 Pics: http://picpaste.de/2016-01-08_16.15.47-cqJ91WMn.png http://picpaste.de/2016-01-08_16.15.44-IZApMNlA.png http://picpaste.de/2016-01-08_16.15.39-DuAHEVIm.png RE: Sniper / Gun - NiLSPACE - 01-17-2016 Sorry for the late answer. I've tried your code, and as I thought the speed was too high. If you multiply the lookvector by 80 instead of 300 it works fine for me. The limit is somewhere around 90. When I multiplied it by that it started to go in a different direction. RE: Sniper / Gun - JuliB - 01-17-2016 Thx! You are right. Maybe I'll try to analyse the single vectors, because this is a very strange phenomenon. Also I use lua variable tables now. If I get out more or hang again I'll write. |