Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Addforce.forward on a sphere object

$
0
0
Hi pros, short question. I wanna make a simple beat em up on a small planet. When my player hits an enemy the enemy should fly over the planet. Right now i am moving the enemy after a hit with addforce. collision.gameObject.GetComponent().AddForce(transform.forward * attackPower); My gravity script takes care that the player is not flying to far away from the planet. So far so good, but i want that the enemy not simply flys straight forward, i want the enemy to crush on the planet from time to time and only "flys" over the surface and not high in the sky. I tryed adding collision.gameObject.GetComponent().AddForce(-transform.up* attackPower); but nothing changed. The enemy still not touching the ground and bouncing back. Any tipps from some experts? Thx Smokki

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>