Gamestudio Links
Zorro Links
Newest Posts
Future of ZorroHFT
by TipmyPip. 09/16/26 09:28
What are you working on?
by rayp. 09/16/26 05:24
Fun Arcade Car Physics (nfs style)
by rayp. 09/16/26 05:23
How to Choose a Free Cataract Surgery Centre in Delhi?
by lokkalyansamiti. 09/15/26 08:27
Blind Zorro Window
by Martin_HH. 09/13/26 13:20
Parent/child object
by 3run. 09/11/26 06:21
ZorroGPT
by TipmyPip. 09/09/26 14:35
[MED] Import from FBX (2010) missing!!!
by USER0328. 09/03/26 18:03
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (3run, bigsmack), 2,284 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
lokkalyansamiti, rahulbuilds, speedx, liop, Bauer097
19235 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
shade-c evo flashlight #438962
03/24/14 16:39
03/24/14 16:39
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
I know how to create lights ect..
But I don`t know how to move lights (in while loop)

What I meen:
Code:
sc_light_create(vector(camera.x, camera.y, camera.z), 1000, vector(25,25,25), SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW , vector(camera.pan, camera.tilt, camera.roll), 90);



This creates a light. I can`t put it in a while loop, otherwise it would constantly create lights and kill my fps.

Is there a way to set shade-c lights to moving objects without killing fps?

Random



Re: shade-c evo flashlight [Re: Random] #438965
03/24/14 17:57
03/24/14 17:57
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
a guess: this function returns the light entity which you can move around.
if guess #1 is true: guess #2: shadomapping depth-views are updated automatically so just moving around the light entity should work


POTATO-MAN saves the day! - Random
Re: shade-c evo flashlight [Re: Random] #438967
03/24/14 18:48
03/24/14 18:48
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Originally Posted By: Random
I know how to create lights ect..
But I don`t know how to move lights (in while loop)

What I meen:
Code:
sc_light_create(vector(camera.x, camera.y, camera.z), 1000, vector(25,25,25), SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW , vector(camera.pan, camera.tilt, camera.roll), 90);



This creates a light. I can`t put it in a while loop, otherwise it would constantly create lights and kill my fps.

Is there a way to set shade-c lights to moving objects without killing fps?

Random


You need pointer of this function to work in a while loop like this:

Code:
ENTITY* spotlight1 = sc_light_create(vector(camera.x, camera.y, camera.z), 1000, vector(25,25,25), SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW , vector(0, -45, 0), 90);

	while(1)
	{
		spotlight1.pan += time_step*.5;
		//update the spotlight
		sc_light_update(spotlight1);
		wait(1);
	}



Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: shade-c evo flashlight [Re: rojart] #439095
03/26/14 18:24
03/26/14 18:24
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Perfect!
It is smooth and I have no preformens loses.




Moderated by  Blink, Hummel, Superku 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1