Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I have a static scene node (it has attribute collision) that must behave like a wall and it dissapears on collision with player. So I try to make it this way: var s = ccbGetSceneNodeFromName("cubeMesh8"); So - node dissapears but the collision remains - I can't go thru that place where the node was. |
||||
|
I mean that this object must be impassable for other actors(and stand still not moving) but it should not fall(so it can just hang in the air) and it must dissapear when collided with player. |
||||
|
Or you can use Coppercube's built-in behavior to delete a scene node. Game and Sound > Delete a scene node That should work! |
||||
|
No - it's the same. But If use collide when moved behaviour then it works. But it passable then. |
||||
|
You could use invisible cube for collision on top of a real object: when player collides with the cube, cube moves up or down, when player is not colliding the cube, cube returns to it's original position. This way the player can pass and the real object can stay the same, disappear, change or whatever you intended. |
||||
|
I have another big problem now. There is a large sphere object - it has only one behaviour(not physics engine) - collide when moved with size 50,20,50 and AffectedByGravity. So this object is not movable by the player(that is the problem) in WEBGL but in windows everything is ok But the gravity works in webgl,,.... So CollideWhenMoved is also corresponds to the physics engine? That's very bad.. no way then |
||||
|
So I tried to do this way but it moves only one direction |
||||
|
I'm not sure but I think that you can't move an object like that without using physics engine. You can maybe simulate movement with script so that it seems like object is using physics but, if you do it that way, you must have a script that takes into account from where the player is pushing (X,Y). |
||||
|
Try changong position wothout moving the sphere onto facing direction because it will move forward only, instead using move by a vector and then using the axis will sure make this move in the described direction...... Hope that helps... |
|