Throwable Item with RigidBody physics instead of TrajectoryObject

nAkoustix

New member
Hi folks,

I'm still in a learnig process of both Unity and this awesome Ultimate Character Controller.
instead of wasting Justins time with email questions, I decided to reach out here. Maybe one of the more experienced users/devs can point me in the right direction.

So, i managed to set up a throwable item, a stick (like for a dog) in my case, to work properly. What causes headache to me, is that I can't figure out how the thrown stick can be simulated with the physics engine / treated as a normal RigidBody after being thrown.
While the TrajectoryObject movement is great and cool for weapon items for all the action/shooter games, I want the stick to just be thrown *wherever* and then lying around there.
Inclusive bouncing on the ground and flipping and so on. I'm so far not able to achieve this with the TrajectoryObject based throw action.

Question A: is this achievable with the included ThrowableItem system?

or

Question B: do i need to write my own UsableItem script to throw the object with RigidBody.AddForce/AddTorque?

Any hints are appreciated :)

P.s.: I really LOVE the opsive assets! It's just a joy to use it and as a beginner, I learned A LOT from just digging into the code <3
 
Question A: is this achievable with the included ThrowableItem system?

or

Question B: do i need to write my own UsableItem script to throw the object with RigidBody.AddForce/AddTorque?
The ThrowableItem component does require the thrown object to be a TrajectoryObject. So it does look like option B is more relevant. I can add it to my list to add support for Rigidbodies though as well.

P.s.: I really LOVE the opsive assets! It's just a joy to use it and as a beginner, I learned A LOT from just digging into the code <3
:love:
 
Thank you! :)

Would be nice to see something like ThrowablePhysicsItem or so as a part of the asset one day!
I think i'll try to implement it myself, seeing it as coding practice :)
 
@vgwizardx Yes, that sounds related. I haven't started yet, because in this early stage of my project i can live with how it is. But i'll definitely let you know, if i get this working. Please do the same :)
 
@nAkoustix Currently what I have is is a pickup item that can be thrown and re-picked up. If that is what your looking for as far as function. I think I can write something up this weekend on how to do it.
 
Hi there. Took me a while to find a post about this topic. I need to throw objects that don't explode... (I'm working on a flare).

I've seen there is no development about this integrated into UCC?

I solved it myself with a playmaker action inside the throwable to deactivate the component and set back the rigidbody off and gravity on.

but It would be nice to have it built-in in the trajectory object..
 
Top