ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator deactivate collision of a model
person icon
karl
Registered User
Quote
2024-07-31 16:38:13

I would like to deactivate the collisions of a certain object when the player enters a trigger, but unfortunately it does not seem to me that in coppercube, there is an action to deactivate the collisions of an object, somehow could someone help me?

person icon
o139
Registered User
Quote
2024-07-31 17:32:49

if you talking about the collide when moved behavior.
i do not think there is a option for that..

you could switch the model with no collision model is my best guess..

person icon
Guest
Guest
Quote
2024-07-31 17:35:16

Unfortunately, you can't enable/disable collision dynamically during runtime. You can't even do with code from the JS API. A possible solution could be:

1. Make two versions of the node, one with collision on, one with collision off. Do not parent them, just make sure each model is at the exact same position as the other.

2. On the model with the collision on, put a transparent texture to make it invisible.

3. Instead of toggling the model's collision on or off, just scale the model with collision on to 0, 0, 0. Scale it to 1, 1, 1 to turn to the collision back on.

It's a gimmicky solution, but I'm afraid it's all we got until it is --eventually (!?) -- updated. emoji icon_grin

person icon
okeoke
Registered User
Quote
2024-07-31 19:21:04

If you're talking about static body collisions you can use JIC's 6.7 launcherhttps://vazahat.itch.io/coppercu....

It has API command for that:
ccbSetCollision(node,true/false)
Update the collision of scene node during runtime. You can turn the collision On and Off.


Overwise, simply create 2 instances of the same object, one with enabled collision and one without, and use
ccbSetSceneNodePositionWithoutCollision

to swap them. You can find more detailed on js API reference page.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |