Please help on basic sprite pos. control as function of dt

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
aks
Posts: 10
Joined: Sat Mar 05, 2005 8:14 pm

Please help on basic sprite pos. control as function of dt

Post by aks »

I have jpg photo sprites that I want to come in at 0,0 and then trail off away from 0,0 to be closer to the screen edges for PDur. I am doing this via the sprites (Default).txt file. Using x="XPOS" and y="YPOS" has the undesirable affect of sometimes overlapping the photos. So I am trying things along the line of:

X="sign ( XPOS ) * ( XPOS * cube( dt ) - 7 * sqr( dt ) - .10 * dt ) / ( cube( dt ) - 2 * sqr( dt ) - dt + 1)"

The Y would be similar. I'm using 3.1.3 and the Standalone 1.0 to see the results.

By the way, U reloads the configs and script files, but it does not reload the sprite (Default).txt.

I am stuck on some problems with the above function and troubleshooting.

1) Sometimes a sprite will jump from quadrant to quadrant. It is as if the XPOS or YPOS suddenly changed sign.

2) The sprites do not last their PDur. Is this because XPOS and YPOS cannot exceed 1?

3) Is there a way to display the current values?

Thanks

aks
Posts: 10
Joined: Sat Mar 05, 2005 8:14 pm

Post by aks »

The jumps still occur after switching to this better function;

X="(XPOS*dt^(1/(4*dt+0.0001))/0.7)+(sign(XPOS)*dt^(1/(4*dt+0.0001))/1.4)"

It seems as if XPOS or YPOS is reset by something or else its calculation is suspended.

Post Reply