Moving a whole room

Hello. I have a first person character with basic controls written in c++.
This character is placed inside a room(imported mesh from blender). The room is like a huge spaceship where the character can move inside.

I need a way of moving the room as if it was a spaceship. The room will be driven by a custom state machine like code. No problem with the state machine, I can do it on c++…

Can I use a character class on the room? Are there any problems on using a character class without a human like mesh?

Sorry for my poor english. Its not my native language.

You don’t need a character class to move a room. All you need to do is make it an Actor. You can then use the TransformActor() method on the room.

You’ll also have to move everything within the room with the room, so you’ll need to make sure that all objects contained in the room are part of that rooms scene graph. If the room moves as a part of a space ship, you’ll probably want to set the room to be a part of the spaceship scene graph so that the room moves and rotates as the space ship moves and rotates.

I couldn’t find TransformActor(), did you mean SetActorTransform()?

Yes :slight_smile:

You want the method which transforms an actor with a transformation matrix. You can use the same matrix for all of the objects in the scene tree, and then use each nested actors transform matrix for their relative changes (offset, rotation, scale, etc).

It causes some strange physics related problems. I’ll try another aproach. I’ll fake it using 2 rooms, one static(where the player will walk) and one dynamic(to be used only for outside camera takes).
What do you think about it?