Frictional Games Forum (read-only)

Full Version: Custom entity not rotating properly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Me and my partner have made a custom model of a large broken gear, where only half of the outer ring is still present, and I'm trying to rotate it with RotatePropToSpeed.

However when I trigger the script, it ends up rotating around the average center of the model, instead of the central hole of the gear. I placed the central hole of the gear right at 0,0,0 in the Model Editor, but that doesn't seem to help.

We even edited the mesh to place a small invisible plane in the middle of the gap in the hopes that we now moved the 'center' of the model to the gear hole. It still doesn't work. Can anyone help me here?
To be able to use RotatePropToSpeed the entity MUST be a Static entity. So in the model editor you need to choose Object::Static
It is.

It rotates, just at the wrong point on the model.
I think you can tell it to use an area as an axis for rotation. Try placing an area in the center of your gear, and then tell it to use the area as the OffsetArea. I've never tried this, but maybe it will work.
If you use a hinge joint, the child body should be the only thing that rotates.
Rotation of custom models depend on the location of the pivot point in your modeling program. The pivot point should always be at 0,0,0 upon export. Make sure the pivot point / 0,0,0 is located at "the central hole of the gear".
(06-07-2012, 06:35 PM)Acies Wrote: [ -> ]Rotation of custom models depend on the location of the pivot point in your modeling program. The pivot point should always be at 0,0,0 upon export. Make sure the pivot point / 0,0,0 is located at "the central hole of the gear".
Yeah, I made sure this is the first thing i did when creating the entity.

And I'm inexperienced with joints, but I placed a hinge joint in the center of the gear hole and made the gear's body the "child body". Not sure what else to do, so I went back to test it in game and it's still rotating wrong.
Edit: Wow, I'm an idiot who did not even see that there's an option for offset area in the Rotate script.