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.

Dark Physics & Dark A.I. & Dark Dynamix / Set the position on a fluid emitter - help!

Author
Message
DrReaper
20
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 21st Aug 2009 03:40
I set the position on a fluid emitter using PHY SET EMITTER POSITION 1,220,0,420 and it moves when I move the camera

I also tried PHY SET FLUID POSITION 1,220,0,420 and it does the same thing.

I just want to set the emmitter in one place and leave it there. It shouldn't move when the camera moves. The camera is numbered 100 so why would this happen?

Anyone else having trouble setting the position of a fluid emitter?
DrReaper
20
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 21st Aug 2009 03:57
It may be setting the emitter to the 2D screen position versus a location in 3D. I am not sure how to correct this.
silken
18
Years of Service
User Offline
Joined: 13th May 2004
Location:
Posted: 28th Aug 2009 12:46 Edited at: 28th Aug 2009 12:47
hmm.. very strange because PHY SET EMITTER POSITION is the good syntax for the position.

Can you post your sample?
DrReaper
20
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 5th Sep 2009 14:58
I would have to post a lot of work to post my code. I am going to write a simple program and see if I can position it right this weekend.
Willie Mundermuffin
17
Years of Service
User Offline
Joined: 5th Jan 2006
Location:
Posted: 6th Sep 2009 08:57 Edited at: 6th Sep 2009 08:58
This is from the Dark Physics API reference manual, maybe it'll help:

"dbPhySetFluidPosition


Description

Set the position of the fluid object. The position of the fluid object can only be modified before it has been built. Attempting to modify the position of fluid after it has been built will result in no change to its position."

In other words, you have to create a new fluid object in order to effectively "move" a fluid emitter.

Hope this helps.
DrReaper
20
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 12th Oct 2009 20:32
I have written two more programs and the fluid never spawns where I set it. I don't know what the heck is happening. These programs don't error out but the fluid never appears or attacks my camera like it's attached to it. I am going to write a version with a basic construct so I can share the code with you.
DrReaper
20
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 14th Oct 2009 03:16
I have narrowed it down to my camera. If I have a camera working on mouse control the water fails and attacks the camera. The effect is too hard to describe so I am adding this code. It is working and I have disabled my camera controls so you can see it working. Rem the working camera code and un-rem my camera code to see what happens.

HowDo
20
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 14th Oct 2009 12:10 Edited at: 14th Oct 2009 12:11
Well you learn something new on here each day, my setup does not like the fluid command set so I am unable to test it.

I know it should work but when I try make and build Fluid it crashes.

Ok worked out what was crashing it, my system does not like these
two commands


so on a 7300SE it will crash using the above, now too what happens with you camera controls.

looked again I think if you are going to end up with code that will be used by many users you'll need to have this bit around the scene code part.



must be my card as all I get is a big blob of fluid and a splash down.

Dark Physics makes any hot drink go cold.
DrReaper
20
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 14th Oct 2009 22:33 Edited at: 14th Oct 2009 22:37
I guess I should have noted it is running in hardware mode. I have an NVIDIA 250 so it works.

If the above program works you should see a green box followed by a blob of water crashing on to it. That at least shows the water code is working on your system. Here is what happens with my code. All I have done is numbered the camera and added mouse controls to it.



I like the code you posted to see if hardware mode it present. Try this and see what happens. It should create the water it should attack the camera and somehow be attached to it. I am still wondering what is happening.
HowDo
20
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 15th Oct 2009 12:46
Yes I see what you mean you get the blob of water hanging around camera 1 instead of hitting the ground away from it.

Well just ran it through the debugger and it works as it should so the problem seem to be DarkBasic and how it does what it does.

Might need Mike and Lee to look at this to see where its going wrong.

Dark Physics makes any hot drink go cold.
DrReaper
20
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 16th Oct 2009 00:29
I opened a support ticket. We will see how it goes...

Login to post a reply

Server time is: 2023-02-05 23:49:37
Your offset time is: 2023-02-05 23:49:37