Spear throw mass to the front of the spearf

AnAppGames

New member
I have a spear that looks like this:

1617320369747.png

Now when you throw a spear you typically add more force to the front of the spear so that it goes up and goes front downwards

However i am not quite sure how to do this with the Throwable Item option. it seems that i can only add mass to the pivot of the model which makes the landing of this spear look a bit off after a throw:
1617320459397.png

Also it is really odd that it floats like this when my collider looks like this:

1617320487191.png

Can anyone help me out? :)
 
You'd probably want to have 2 different colliders on the spear, one for the handle and one for the tip, then give each a separate Rigidbody, adjusting the mass of each.
 
You'd probably want to have 2 different colliders on the spear, one for the handle and one for the tip, then give each a separate Rigidbody, adjusting the mass of each.
How does that work with the Trajectory object component that needs to be on the gameobject
 
Ive tried to add a Rigidbody but all of them become kinematic and freezer position when thrown i think its because of the Trajectory object :(
 
I would subclass the Projectile component and add your own logic for rotating the sphere. The Trajectory Object does not use the rigidbody component for the physics.
 
I would subclass the Projectile component and add your own logic for rotating the sphere. The Trajectory Object does not use the rigidbody component for the physics.
Okay i am not really too familiar with how to do that (i can script but i am not really too into projectile component) could you help me get started? :)
 
Ah yeah I'd forgotten that TrajectoryObject doesn't use Rigidbody physics.

The basic idea would be to subclass the Projectile component and update its rotation as it moves, within Update or FixedUpdate.
 
Top