[HELP] Is it possible to rotate or move an entity after AttachEntityToEntity?

Hey everyone,

I’m currently working on a system that involves attaching a prop to a vehicle using AttachEntityToEntity, and I ran into a limitation I can’t seem to get around.

:wrench: Context:

I attach a rotating object (e.g., a fan or turbine prop) to the hood of a vehicle to simulate a spinning turbo rotor. The attachment works fine — the prop stays where it should — but I can’t get it to rotate after being attached.

I’ve tried using:

  • SetEntityRotation (no effect after attachment)
  • SetEntityHeading (same result)
  • SetEntityQuaternion (same result)

Nothing seems to visually update the rotation once the entity is attached to the vehicle.

:question: My question:

Is there any way to update the position and/or rotation of an entity after it has been attached with AttachEntityToEntity?

If not, what would be the best alternative to simulate a spinning rotor while keeping it synced with the vehicle?

Any help, insight or workarounds are appreciated!

Thanks in advance.

Have you tried calling AttachEntityToEntity again with the updated rotation values?

1 Like

No, I didn’t call it again because I don’t want to detach the entity.
What I’m trying to do is rotate the prop while it’s still attached to the vehicle.
Is there any way to update the rotation of an entity after it has been attached with AttachEntityToEntity ?

As @ChristopherM already said: Call AttachEntityToEntity again with the adjusted rotation. It does not detach the entity.

1 Like