Sphere problem
Post Reply
Quote
Re: Sphere problem
Posted by Raventyr on Mon Dec 20th at 3:03pm 2004


Greets,

I've been working on some ideas and I wanted to add a ball to the game to see how the physics handle it. I built a sphere in xsi and successfully ported it in to hammer, and the game. The trouble I am having is with movement. I added the sphere as a "prop_physics_override" because i don't want it to take damage, but i still want it to be manipulated by the player. Everything seems to work fine except that once the ball is rolling, it will not stop. I've looked for some kind of friction settings, but found nothing. Any clues anybody ?





Quote
Re: Sphere problem
Posted by Captain P on Mon Dec 20th at 3:30pm 2004


The ball has not yet physics info attached to it I think? I don't know how to add that, but that's what I think the problem is...
[addsig]




Quote
Re: Sphere problem
Posted by Nickelplate on Mon Dec 20th at 4:57pm 2004


just make it a prop_physics. this fixed eternally rolling barrels for me. just leave default settings and it won't take damage. [addsig]



Quote
Re: Sphere problem
Posted by Raventyr on Wed Dec 22nd at 5:34pm 2004


Cheers for the replies. It seems that if i add the ball as a standard prop_physics it doesn't show up in the game, which is odd considering it works fine as a prop_physics_override. Maybe I am missing something in the .qc file of my model. Any chance someone could copy paste a working prop_physics model's .qc file code ?



Quote
Re: Sphere problem
Posted by Nickelplate on Wed Dec 22nd at 5:51pm 2004


i will get one when i get home. [addsig]



Quote
Re: Sphere problem
Posted by Raventyr on Sun Dec 26th at 5:38pm 2004


Still having trouble stopping this ball from rolling. I've delved in to some other parameters in the model .qc file but still no joy. Perhaps it could be something to do with surface type. It just won't show up if its set to a prop_physics

I thought inertia was going to cover it, and it does make the ball slow down, but it still keeps rolling, just slower than normal, lol.





Quote
Re: Sphere problem
Posted by Leperous on Mon Dec 27th at 3:07pm 2004


Try a prop_dynamic, then?





Quote
Re: Sphere problem
Posted by Raventyr on Wed Dec 29th at 12:22pm 2004


My model just doesn't appear in game unless i set it as a prop_physics_override, which would be fine if it ever stopped rolling... very strange.



Quote
Re: Sphere problem
Posted by Nickelplate on Wed Dec 29th at 1:57pm 2004


does your model have bones and a hitbox and all that garbage? [addsig]



Quote
Re: Sphere problem
Posted by Raventyr on Sun Jan 9th at 5:16pm 2005


Still no joy with this problem, but I noticed that its not just me. I just got done with Troika games "vampire the masquerade: bloodlines", which most of you will know was built with the source engine. On the last levels I noticed that when you kill a security guard that is attacking with a baton, and he drops the baton, it continuously rolls back and forth, bouncing off walls.. slowly but surely. Interesting.





Quote
Re: Sphere problem
Posted by Livett on Sun Jan 9th at 5:19pm 2005


Tried prop_physics_multiplayer?



Quote
Re: Sphere problem
Posted by uberDingo on Sun Jan 9th at 5:36pm 2005


prop_physics_multiplayer has some wierd interactions though as well. You can't stand on a prop_physics_multiplayer or do much of anything EXCEPT make it roll forward. You cant even block them to stop them from moving... though they do seem to stop on their own /shrug



Quote
Re: Sphere problem
Posted by Jesta on Sun Jan 9th at 8:15pm 2005


I suspect your problem is with the model. I think what prop_physics_override does is ignore the model's physics data - if this is the case, then what is happening is your model has incorrect physics data, which is why only prop_physics_override works.

Fire up modelviewer and try loading your model, this will give some clues. You can see the physics mesh in there - if it doesn't show up, something went wrong while compiling. Not an expert on XSI but you'll have to make another copy of your sphere, in some way subdivided (smoothing groups in MAX, dunno bout XSI) to make an accurate physics mesh. Then export it as <modelname>_phys.smd, stick it in the same folder as your first SMD, and include it in your .qc file with this:

$collisionmodel "<modelname>_phys.smd" {
$Mass 100 <-----Whatever you want the mass to be, in kg
$concave
}

Then recompile your model.

Basically, if you don't supply a physics mesh, studiomdl tries to make it's own, drawing boxes the shortest possible distances between vertices. So if your model looked like this:

Then the automatic physics model is this:

If you think about it, if Studiomdl tried this technique on a sphere (depending partly on how you constructed it i guerss), it could end up with a very very wrong physics mesh, possibly even an empty one.

By subdividing it yourself and exporting a separate physics mesh, you can properly subdivide it yourself: for example,

Have a look at the SDK section on porting models from HL1, it is the only place I know of with info on how to construct the physics mesh. Once you have the right physics model, you can use the other physics object types, hopefully solving your problem.

Hope that helps!





Quote
Re: Sphere problem
Posted by DrGlass on Sun Jan 9th at 10:45pm 2005


make a tut with that info in it, very informative.




Quote
Re: Sphere problem
Posted by Raventyr on Fri Jan 21st at 10:42am 2005


Very informative Jesta, thanks. I was already using a collision model, and it appeared to be fine, but on closer inspection it is not very smooth, although it is spherical, it is covered in small points, making it rough. Perhaps this is why it will not stop continuously propelling itself along, i'm not sure. It definately has a slight wobble in its motion. Then again it still does not fix the issue of it only working as a physics override model. I've tried subdividing my mesh and various other things, but am still baffled.

EDIT: Just to clarify, the model itself is smooth, it is the physics model that is rough.





Quote
Re: Sphere problem
Posted by Raventyr on Tue Jan 25th at 4:01pm 2005


Well, I have managed to get the model to work as a prop physics now, that was my bad, just needed to redo the .qc file, but i'm still getting the continuous rolling. So wish that I had max, i'm not having much luck finding the equivalent of smoothing groups in xsi.




Post Reply