≡
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: "Inter?ational"
(you are not logged in)
Text:
[quote][b][/b] wrote: Sure thing Chris. In my "Rebel County game", I made an aeroplane that aims down onto the city as it flies above. I used a green dot as the target, which automatically adjusts height/distance as it traces over the buildings/terrain etc. It's very easy to do... 1- The LASER dot is a transparent png applied to a billboard. 2- The Aeroplane has "every 10 milliseconds", shoot a bullet-node (to the camera center) with "no damage". 3- Then when the invisible bullet hits, I use "on hit, change position of the LASER dot billboard", relative to the "last bullet position". What happens is, every 10ms the aeroplane shoots an invisible bullet. When it hits the ground or a building, it moves the LASER dot to that position. This gives the impression of a LASER dot. *Once you get it working, you can set the shoot speed of the invisible bullet quite high, so there is no visible delay when the dot moves, otherwise (if the shoot speed is too low) the LASER dot's movement will be jerky. Also set the shoot distance quite high so that the bullet reaches the terrain, otherwise it wont work if the bullet can;t actually hit anything. You can then make a missile fly to the LASER dot when a key is pressed (by using "change position" of missile model, relative to LASER dot node, animate the movement over 5000ms, for example). To make a [b]beam[/b], I just use a transparent png, stretched out from the gun/torch model, then place the LASER dot/Torch dot to gove the effect of the beam hitting a surface. I don't make the beam too long (otherwise it will poke through the other side when it gets close to an object) - just enough to give the illusion of the beam - the dot will complete the illusion. This is demonstrated in my T2 Arcade game for the enemy gun sights. I clone the beam and rotate the clone through 90 degrees (to make a cross) so it can be seem from all angles. [url]https://www.youtube.com/watch?v=Qfl92fagjWQ[/url] If you then attach a point-light node to the bullet, the "beam" actually lights the scene as the bullet node shoots. This technique can be used for fire-projectiles/magic-effects, lightening (in my Cas-Evac game), explosions or LASERs/torches etc. I can make a ccb file as an example if you need it.[/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