Problem to move a room composed by six wall (six box)

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Problem to move a room composed by six wall (six box)

Postby jeje » Thu May 27, 2010 12:37 pm

Hi everyone,

I'm working on a project and I need some help :

I have a room composed by six walls (six box) and the camera is inside the room.
I want to rotate the room.

I have tried to join the walls together (Custom6DOF and others) and then move one wall expecting that the others walls will follow. But it didn't work, the joint was too soft.

Then I tried to create a Null collision corresponding to the room and attach the walls to it with joints and then move the Null collision. But the walls didn't follow.

If I move independently each wall with their own force and torque callback I'm afraid the room will be deformed. And if I use the matrix to "teleport" the room in it's new position, the objects in the room may pass through the walls.

I don't know if I'm using the wrong method or if I have made mistakes during the joints creation.

Could you tell me the proper way to solve my problem ?

PS: The room is in fact a part (a cube) of a Rubik's Cube (3x3), that's why it needs to move. Currently I'm just trying to rotate the room/cube at the center of a face of the Rubik's Cube. My next step will be to make the others rooms/cubes of the face follow the rotation. I think the problem will be the same.
jeje
 
Posts: 4
Joined: Thu May 27, 2010 12:18 pm

Re: Problem to move a room composed by six wall (six box)

Postby Stucuk » Thu May 27, 2010 2:53 pm

Why don't you make all the walls be a compound collision? That way they will become one object but have the physical body of 6 separate walls.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Problem to move a room composed by six wall (six box)

Postby jeje » Fri May 28, 2010 12:53 pm

Thank you for your reply,

I tried compound collision but the camera (custom player controller) couldn't move anymore in the room.
I may have made a mistake during the compound collision creation, I will try it again.
As the player is in the room, I thought that it would be a problem to be inside the compound collision.
Compound collision doesn't have to be convex ?

The player will have to get out of the room and go in the next room (he is still in a cube of a Rubik's Cube), so I will have to destroy a wall of the room, moreover some rooms (the room in the center of a face for example) have only two walls. That's why I thought that compound collision is a bad idea, but maybe I misunderstand what compound collision are, I need to read the wiki again :roll:.

I'm sorry if my English is bad, I'm a French student.
ok ok that's not an excuse ^^
jeje
 
Posts: 4
Joined: Thu May 27, 2010 12:18 pm

Re: Problem to move a room composed by six wall (six box)

Postby Stucuk » Sat May 29, 2010 12:13 pm

Bonjure, Je M'appel Stucuk. Je habbita Not Telling You en Eccose. J'ai 25 ans. (Thats all i remember from High School)

Compound collisions are like a group. The collision is one object, but the collisions you add to it don't change in any way after being added to the compound collision. So its like there still all separate except that they react like one object when moved/touched/etc. Re-creating compound collisions is fast, so it shouldn't be a problem to destroy one and re-create it.

Compound collisions can be convex and concave, but the collisions you add to it have to be convex.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: Problem to move a room composed by six wall (six box)

Postby jeje » Sat May 29, 2010 1:09 pm

Thank you, I will try this next week.
jeje
 
Posts: 4
Joined: Thu May 27, 2010 12:18 pm

Re: Problem to move a room composed by six wall (six box)

Postby jeje » Sat Jun 05, 2010 5:07 am

Ok, the compound collision works for the walls.

Now I need to attach the cubes of a face, I can't use compound collisions here, I will try with joint.
jeje
 
Posts: 4
Joined: Thu May 27, 2010 12:18 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron