Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 584 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Testing for Stuck Physics Objects #36630
11/22/04 01:45
11/22/04 01:45
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

I need to write a routine that checks for when spinners (hinges) freeze and to reset them. How can I know when they have frozen? The spinners can come to rest naturally, so simply checking their angular velocity won't do.

Balls tend to get stuck in level geometry. I have already writtten an algorithm that checks their velocity and nudges/removes them if they stay in one place too long. However, this works very well when a balls comes to rest on top of an object (if it doesn't sink into it first), but when they are imbedded in a block they don't pop. Even though I can see they are not moving, they remain on the screen for a long time. How can I check for balls that are stuck inside blocks?



Also, I tried changing values for ph_setcorrections. This is supposed to check when a physics object is in an unacceptable position and correct it. No matter how I change the values, it doesn't improve anything.



Last edited by A.Russell; 11/22/04 01:50.
Re: Testing for Stuck Physics Objects [Re: A.Russell] #36631
11/22/04 01:50
11/22/04 01:50
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline
Expert
Error014  Offline
Expert

Joined: Jul 2002
Posts: 3,208
Germany
Maybe content works for you?


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: Testing for Stuck Physics Objects [Re: Error014] #36632
11/22/04 01:51
11/22/04 01:51
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

What do you mean?

Re: Testing for Stuck Physics Objects [Re: A.Russell] #36633
11/22/04 01:53
11/22/04 01:53
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

Oh, I see, I'll try it.

Re: Testing for Stuck Physics Objects [Re: A.Russell] #36634
11/22/04 01:54
11/22/04 01:54
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline
Expert
Error014  Offline
Expert

Joined: Jul 2002
Posts: 3,208
Germany
In Antwort auf:


content (Vector);
c_content(vector)
Checks the block material at the position given by the vector. The instruction returns a value of CONTENT_EMPTY (1) if empty space, CONTENT_PASSABLE (2) if a passable block, or CONTENT_SOLID (3) if a solid block is detected at the given position. Blocks in the level as well as in map entities are detected - but no other entities. You is set to the entity detected at the position, if any. c_content uses the new collision system.





That was the first thing which came to my mind, and maybe it works

IF(content(my.x)==3) {
//i am in a block
}


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: Testing for Stuck Physics Objects [Re: Error014] #36635
11/22/04 03:54
11/22/04 03:54
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
I suggest also looking into event_stuck, though I'm not sure what it's status is with the new c_move instructions. This might address your stuck ball problem.

RE: the spinners, maybe, just maybe, the solutions for stuck balls will also work for stuck (ie frozen) spinners. That is, make the spinners sensible to event_stuck and if it gets triggered when your spinner freezes, you can give it a nudge, destroy and recreate, whatever.

Otherwise, short of sampling the velocity of the spinners every frame or two and checking when it goes from a large velocity to a dead stop, I can't think of another way to check for frozen spinners off the top of my head.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | 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