Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello, I am trying to get some code to work (I do use CopperCube but I need this entirely in Javascript). It moves the camera to a position according to where one clicks on a map. But (as per forum) there is no way to disable collisions on the fly in Copperlicht and so the camera gets stuck when a new position entails it moving through a wall. So I am left with the option of creating a new camera on the fly once I have the new position vector. This does create a bit of coding and it seems a pity. To be clear i do need to see the camera move, I want it to appear in the new position but the Pos function seems to move it rather than transport it. Is there no way to keep my camera and just move it through walls with JavaScript? Here is the part of the code that does it (and it does it well in copperlicht if I disable collisions on that camera in CopperCube)
Any help would be much appreciated (if there is a way to temporarily disable then re enable collisions it would be perfect right now) I can't use restart behaviour of a node in CopperCube as I need this in Javascript Daniel |
||||
|
I have sorted it out myself!!!! I love programming!! All that was needed was a simple camera and two AnimatorCollisionResponse. Here is the code (simplified) for you all out there who might have needed a simple solution:
The great thing is, this enables disabling of collisions on the fly |
||||
|
Nice :) |
|