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.

Author
Message
Codger
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 15th Dec 2007 05:56 Edited at: 15th Dec 2007 05:58
I modified the force field demo to to reverse the direction of the effect (repel instead of attack)



when I tried to change the effect on the fly nothing happens



am I doing something wrong

Codger

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Dec 2007 08:18
I may be wrong here but it seems like to me that once its applied its a constant, cant be changed.

What I think you need to do is have 2 forces the opposite of each other then swap and sleep the one that is not active.
Kendor
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 15th Dec 2007 10:22 Edited at: 15th Dec 2007 10:23
Yeah, it seems that you cannot change the parameters of a force field once it was created.

Option 1 is to delete the force field and create a new one on the fly:



Option 2 and possibly a bug, is to not delete the force field but recreate it with enough force to counter act the previous one:



It seems that it does not check whether a force field already exists and so does not report an error. The same applies to phy delete force field.

I think a better way to implement force fields would be similar to how materials are handled. You create a force field independent of the object and then apply it to the object/s when the need arises.

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.
Codger
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 15th Dec 2007 20:48
Once I delete the field "by pressing the mouse buttons" the effect disappears




It will help when a more detailed explanation of the parameters are forhcoming

Codger

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem

Login to post a reply

Server time is: 2024-11-24 20:32:11
Your offset time is: 2024-11-24 20:32:11