≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Collision Detection Tip (non-code)
Posted by:
(you are not logged in)
Enter the missing letter in: "Int?rnational"
(you are not logged in)
Text:
[quote][b]veganpete[/b] wrote: Whilst making my game "Rebel County", I devised a Non-Code [b]Collision Detection System[/b] (Using the "Shoot" action). It's a little bit complicated to set up, but it has multiple uses, so maybe people will find it useful. I can make a ccb if anyone wants it: 1: Create 3 "dummy node's" (3 spheres with 0,0,0 dimensions and polygons). 2: Rename dummy-nodes as "Collision_Emitter", "Collision_Bullet", "Collision_Detector". 3: Attach/Child the "Collision_Emitter" to the Player/Character node (Child-Position 0,0,0). 4: Add an "every few seconds" behaviour to the "Collision_Emitter" (every 5ms, Shoot). 5: Use the "Collision_Bullet" node as a bullet and add/check the "Action on impact". 6: Set "Action On impact" to "Change Position to Last Bullet Impact" for "Collision_Detector" node. 7: Add "On Proximity" events to the "Collision_Detector" node (examples: change-animation/play-sound etc). [b]What this does:[/b] Every 5miliseconds, the Player/Character shoots an invisible node to the front. Whenever the bullet-node hits any object, the detector-node is placed at that position. If the Player walks near the detector-node, "collision" is detected. On collision detection, an action is carried out such as change animation, play sound etc (see examples below). [b]Modifications:[/b] You can set-up multiple emitters to detect collision to front/sides/rear and bottom. You can rotate the shooter to shoot bullets in a circle around the player. You can shoot the Collision Emitter from the camera to the camera's aim. [b]Examples of use in my game:[/b] Events when Vehicle crashes into walls or other vehicles. Trigger events when player leaves/contacts irregular terrain. Missile/Grenade Explosions on impact with enemies/buildings/terrain. 3D aiming/Line of sight. Characters can avoid walking into each other and scenery. Aeroplane "Fly-by-wire" flight system. 1st and 3rd person "move player using mouse". LASER-dot/Torch beam effect (attach/child a visible light or billboard to "Collision_Detector" node). Trigger a sound when near an object. Action when aim moves over a target object. Climb walls/ladder when close by. Parkour: Automatically jump over gaps. Crouch/crawl through tunnels. Change an animation when close to a hazard. Simple Path-finding (find/follow route with least collisions). [b]Why use bullets instead of standard "On Proximity"? [/b] Bullet-collision provides multiple uses not available with standard "on proximity" events. Standard "On proximity" may require multiple instances. Bullet-collision recycles a single "on proximity" event, so it's very fast and resource friendly. A "Bullet_Collider" is very accurate and will detect collision of very complex shapes. The "Shoot_Collider" will detect collision of moving objects/nodes (not just static nodes). One set-up detects collision with any other scene node - no need to add multiple "on proximity" events. "Bullet Collision" has multiple (endless?) possibilities.[/quote]
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
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact