just discovered this thread when searching for an impact prediction for a bullet-behaviour-controlled object.
I tried to apply your calculations to my project, but that didn't quite work out, since my setup is a bit different compared to yours.
Can you help me with this? (Image of current setup further down)
I have the following scenario:A projectile with the bullet behaviour gets shot from a specific angle (and a slightly elevated position) at a specific initial speed (400) and gets dragged down by the bullet's gravity (450).
So the thing is, I don't set the initial horizontal and vertical speed with the mouse, but with the bullet's initial speed.I want to mark the impact point on the ground (at a specific y = 570) with a sprite.
So I tried to set the sprite's position to posx,570
, after repeating the loop 11 times.
The sprite was somewhere near the impact point, but nowhere near the accuracy in your example.My question to you is now:
To which number should I modify the loop count and do I even need a step value, since I don't need any trajectory displayed?
Thanks for any answer, here is my current setup:
- Code: Select all
("Launcher" is slightly elevated)
(I don't expect you to deal with the mess of my capx)
(Btw, I took a look at the bullet launch in the debug view and figured that on launch, the bullet's vx0 is the set Bullet.Speed and vy0 is always 0, maybe that's an issue here..)