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 GDK / Sparky not working

Author
Message
Oster200
13
Years of Service
User Offline
Joined: 21st Jan 2011
Location:
Posted: 27th Oct 2011 05:50 Edited at: 27th Oct 2011 05:52
Well im trying to make my 3d object colldie with a head but it is not working. I copyed the sliding demo. i made and put in my object in the game by doing this.



i do have a question with this part. The question is, using SC_SetupObject(100, 1, and here goes the shape) well my object is not a circle, or box, so it has to be a polygon. My object is just a head with a pointy nose and ears. so i put down Polygon.

Oh yea i also put the head in the same group as the terrain. This might be a problem i dont know.



Since the monsterHead is in the same group i was hoping i would not have to do anything with collsion. I found out that it does not work.

Im asking how do i make collision with this?

Here is the full code:


I put this in the DarkGDK topic because i may need to make a function in dark gdk and im doing this with DarkGDK

Always end the name of your child with a vowel, so that when you yell the name will carry. - Bill Cosby
California is a fine place to live - if you happen to be an orange. - Fred Allen
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 29th Oct 2011 14:47
I don't have time to look through the whole code, but in the first few lines you quoted, you scale the object after setting it up for collision. You should scale it first and then set it up, otherwise the new scale has no effect on the collision mesh. Even the positioning should be done before the setup, since, as far as I can see, you never use SC_UpdateObject on object 100 to update its position for the collision check.
Oster200
13
Years of Service
User Offline
Joined: 21st Jan 2011
Location:
Posted: 29th Oct 2011 20:16 Edited at: 29th Oct 2011 20:17
Its working fin now. the problem was i called SC_SetupObject to early but the scalling worked fine that is why i dint look at SC_SetupObject

And since i am not moving the object i dont need to call SC_UpdateObject but eventually i will

Thanks

Always end the name of your child with a vowel, so that when you yell the name will carry. - Bill Cosby
California is a fine place to live - if you happen to be an orange. - Fred Allen
Oster200
13
Years of Service
User Offline
Joined: 21st Jan 2011
Location:
Posted: 1st Nov 2011 05:24
When i just add a code this simple in the while loop


It says this


I dont know if this is werid or not but the code works as it is supposed to even though that pop ups.

How do i get that to go away

Always end the name of your child with a vowel, so that when you yell the name will carry. - Bill Cosby
California is a fine place to live - if you happen to be an orange. - Fred Allen
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 10th Nov 2011 18:22
I am playing with Sparky sliding also... I found that sometimes... the "slide sphere" will get stuck on a perfectly flat surface on one model... but not another... same kind of surface slides gorgeous.

Because it's so consistent, I suspect that it's how the actual vertex are wound OR perhaps the normals in the mesh (kinda point the direction of the points - good for hardware lighting - shadows - whatever) for the model - so sometimes your code is spot on and no slide...

But if you get no slide anywhere - I might check the code of course - but I wanted to point this out because it can be baffling... it's definitely a hard one to solve 100%.

Has anyone seen Sparky around? Wonder if he has a newer version out that might solve... hmmm Hope he is well!

Login to post a reply

Server time is: 2024-10-02 21:37:14
Your offset time is: 2024-10-02 21:37:14