-
What do you want to achieve? Keep it simple and clear!
I’m trying to get my non-ray cast projectile to face the direction it is moving at all times, even after it switches directions. The missile itself is a sphere part with a body gyro and friction set to zero and friction weight set to 100 -
What is the issue?
I can’t seem to figure out how to force the CFrame of the projectile to face the direction of movement. -
What solutions have you tried so far?
I did some searching on this topic and most people have solved this by having a target Position to use for a “lookAt” argument. I do not have a target position and my projectile is made to ricochet off barrier walls. The direction the projectile is facing after the ricochet is usually the same as it was before it hit the barrier. I have tried using the velocity vector but it is not working. So I’m not sure what I can use. There is no fancy scripting going on here. I simply use the built in game physics and reset the projectiles velocity magnitude after it hits a barrier wall.
missile.Velocity = (missile.Velocity.Unit * missileSpeed)
missile.CFrame = CFrame.new(missile.CFrame.Position, missile.Velocity)