Hello everyone. you know how you can stop movement of projectile on a Z-axis. bullet must not change position on Z axis. Any help please!!!
Hey Miki,
In your projectile’s Blueprint, go to Projectile Movement component in your Components or Defaults tab. Scroll down to Planar Movement section. If you enable Constrain to Plane and set Plane Constraint Normal Z value to 1.0, projectile will never change its Z value. If you hover cursor over “Plane Constraint Normal” you’ll get a summary of how to use this, if you need to make other changes.
This might interfere with projectile’s physics, so if you don’t need it for anything else I would avoid simulating physics on projectile’s components.
Hope that helps!
Thanks for your help. But let me explain better, bullet bounces and since game is side scoller I need that when it hits something it does not move in depth.
If you’re going to use physics with your planar constraints, you’ll probably need to do a constant check to adjust axis value of projectile. Set a float variable equal to mesh’s starting axis value, then on Tick set axis value of mesh to that variable. Something like this:
This will constantly reset X value of projectile to its starting X value, keeping it restricted to that plane. Note that this is in addition to Plane Constraint Normal settings described above.
thank you very much. you have been very kind !!