Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Texture, Model & Animation Help Custom entity not rotating properly
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Custom entity not rotating properly

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?

06-07-2012, 08:42 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Custom entity not rotating properly

To be able to use RotatePropToSpeed the entity MUST be a Static entity. So in the model editor you need to choose Object::Static

06-07-2012, 08:43 AM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#3
RE: Custom entity not rotating properly

It is.

It rotates, just at the wrong point on the model.

06-07-2012, 09:00 AM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#4
RE: Custom entity not rotating properly

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.

Dark Seclusion Here
06-07-2012, 10:26 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Custom entity not rotating properly

If you use a hinge joint, the child body should be the only thing that rotates.

Tutorials: From Noob to Pro
06-07-2012, 05:45 PM
Website Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#6
RE: Custom entity not rotating properly

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".

[Image: mZiYnxe.png]


06-07-2012, 06:35 PM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#7
RE: Custom entity not rotating properly

(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.

06-07-2012, 08:37 PM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#8
RE: Custom entity not rotating properly

Edit: Wow, I'm an idiot who did not even see that there's an option for offset area in the Rotate script.

(This post was last modified: 06-09-2012, 08:16 AM by Damascus.)
06-08-2012, 09:51 PM
Find




Users browsing this thread: 1 Guest(s)