Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I am interested if there is possibility to make stealth in CopperCube. It can be pretty simple, not some super fancy stuff. Like hide behind objects so enemy can't see you. Is it possible? |
||||
|
Yeah it's totally possible. I'd use JS to do it, but you can probably make a decent stealth system with just the default stuff and variables. Perhaps use the On Proximity behavior to make "stealth zones" aka dark areas like alcoves or behind stacks of crates. |
||||
|
Thank you! Thats great idea, gonna try it. |
||||
|
JoseFumo GO... but we came back. |
||||
|
josefumo wrote: Like hide behind objects so enemy can't see you. Is it possible? Yes, as mentioned use javascript to check when an enemy is activated or within distance to player to do something, then make the enemy face the player and then run "ccbGetCollisionPointOfWorldWithLine(startX, startY, startZ, endX, endY, endZ)" to get view collisions. With this collision location see if that line from the enemy to this collision point intersects the player bounding box using "ccbDoesLineCollideWithBoundingBoxOfSceneNode(node, startX, startY, startZ, endX, endY, endZ)" to see if they player is in view of the enemy and adjust accordingly.. |
|