Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Spot Lights & Collision box Questions!

Author
Message
SlayrUK
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 13th Apr 2005 06:53
Yet again, im running into troubles with my first real game (in 4 years anyway!).

I am trying to create a spot light effect - It must be positioned above the character and shine down onto him and an area of the ground below him. It'll move with him obviously. I want this to make the user only be able to see clearly a small amount around the character and then darken all the distance and further off elements of the level. Anyone have any code or ideas on how to achieve this please?

Secondly, I used long boxes to create 'laser beams' for one section of the game. Some of these are rotate on the Y-Axis to add variety to the level:

(example)

/ / < those ones rotated (top view)
| |

I made collision boxes for the lasers and it works fine for the non rotated ones - but the problem is that the objects colision box has not moved with the rotated objects. Thus the colision box is still like this:

| | < colision not rotated
| |

Is there anyway of coding it so that the colision box is rotated to match the laser beams?
Just to clarify - the beam is not rotating in game at any point - just as the level is initially created!

Thanks guys in advance - greatly appriciated!

Dave

Login to post a reply

Server time is: 2025-05-23 12:51:44
Your offset time is: 2025-05-23 12:51:44