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.

AppGameKit Classic Chat / [SOLVED] Get Light position

Author
Message
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 20th May 2023 23:03
You can place a light at a given pos but you can not get the lights pos and that is sometimes a problem with looks.

So, I can see the light but can not see a light pos placement object because I can not place a object to the light position.

I am talking about if the light is moving with a object.

So I am setting a light to follow my player if his weapon is active.

But the light is not always correct so I was wanting to set a light object to be at the lights pos to see my problem, so any ideas?

The author of this post has marked a post as an answer.

Go to answer

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 20th May 2023 23:28 Edited at: 20th May 2023 23:28
you're setting the position so you should know (and be able to record/display) its coords? what am i missing?
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 21st May 2023 00:00
Yes I am setting the lights pos but it does not reflect like i was needing so there is a problem, but to figure out what the problem might be i was going to set a light object to be at the lights pos to act like the light. I do not think that the light stays at the front of my player but around the player as he turns around.

But as there is no light placement object to see i will never know where the light really is.

I pray that made any sense.
PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 21st May 2023 02:25 Edited at: 21st May 2023 03:27
This post has been marked by the post author as the answer.
You could determine the position of your "light object" and transfer it to the actual point light when the light object moves, something like this:
( MOVE PLAYER WITH ARROW KEYS )



PSY


PSY LABS Games
Coders don't die, they just gosub without return
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 21st May 2023 07:00 Edited at: 21st May 2023 07:29
Edit

Never mind, I did not look at you code correct, it is exactly what I want, thank you for your time.
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 21st May 2023 07:50
I think what i was doing is setting the lights pos with out real world x,y,z.

And this fixed it, and with the array set up, that is just perfect.
PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 21st May 2023 18:30
You're welcome mate


PSY LABS Games
Coders don't die, they just gosub without return

Login to post a reply

Server time is: 2024-05-05 12:55:16
Your offset time is: 2024-05-05 12:55:16