Sniper / Gun
#21
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...
Reply
Thanks given by:
#22
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
)
Reply
Thanks given by:
#23
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 ?
Reply
Thanks given by:
#24
That's strange. Could you give us your code?
Reply
Thanks given by:
#25
http://pastebin.com/nLEy5kRV
Whole code
Reply
Thanks given by:
#26
The only thing I can think of i that you set the LookVector way too high. Perhaps try to lower it.
Reply
Thanks given by:
#27
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
Reply
Thanks given by:
#28
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.
Reply
Thanks given by:
#29
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.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)