Cuberite Forum

Full Version: Sniper / Gun
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Sounds good! Which articles in the API should I read?
The rest works 1ABig Grin ...nearly... The zoom is made by slowness, but it bugs when changing between flying and walking... But this is complete okay.Smile And anything is not wright with the vector... the snowball is like magnetic...
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
)
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 ?
That's strange. Could you give us your code?
The only thing I can think of i that you set the LookVector way too high. Perhaps try to lower it.
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.
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.
Pages: 1 2 3