RF and physics
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Ok, thats cool. I was thinkin about not making full skinned character meshes and making each part of the character seperate like in early N64 and PS1 games, this would then allow me to make rag doll in the first release right? Keep up the great work!
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
A static body was added tothe physics code that allows to have collision with physic actors and motion supported by RF (and not by the physics engine). For example the player is defined as a static body (so if a ball hits him, collision will appear, but no motion)
I've also renewed part of the physics code to make it more modular
New features added:
- Sensors are added and in debugging phase
- The PhysicsForce entity was enhanced with a few additional trigger features, like timmed trigger, distance to a pawn, key pressed, rigidbody shot and a few more. You can also use the entity outside the physics system to trigger any event
- Shooting was updated and supports now free definition which joint you want to break when a body is shot
- For debugging purposes, the physics system's BBOXes can be visualized (without rotation though...)
- Added a few more physics script commands like extend rigid bodies with additonal geometry, break a joint, add a static body, return sensor data etc...
I'm now working on a PhysicsVehicle entity (a universal car entity)
The idea is that you just assign actors for the car body and the car wheels, that you assign the relative positions where the wheels have to fit the car body and that you define the keys by which you want to control the car. All other things will be done by the PhysicsVehicle entity for you.
I've also renewed part of the physics code to make it more modular
New features added:
- Sensors are added and in debugging phase
- The PhysicsForce entity was enhanced with a few additional trigger features, like timmed trigger, distance to a pawn, key pressed, rigidbody shot and a few more. You can also use the entity outside the physics system to trigger any event
- Shooting was updated and supports now free definition which joint you want to break when a body is shot
- For debugging purposes, the physics system's BBOXes can be visualized (without rotation though...)
- Added a few more physics script commands like extend rigid bodies with additonal geometry, break a joint, add a static body, return sensor data etc...
I'm now working on a PhysicsVehicle entity (a universal car entity)
The idea is that you just assign actors for the car body and the car wheels, that you assign the relative positions where the wheels have to fit the car body and that you define the keys by which you want to control the car. All other things will be done by the PhysicsVehicle entity for you.
Here is a list of things that work:
- Sensors are implemented and working (For ray casting)
- Motors are implemented and working (For automatocally rotating something)
- 2 joints are implemented (hinge + ball/socket)
- You can extend physical bodies to create more complex shapes
- You can create a chain of boxes and "hang" it
- You can shoot the chain in parts
- You can shoot on bodies and they will fly around
- You can make an object to fall, bounce, lift, move, accellarate, rotate etc...
- You can script a lot of physics
eg, a wall of boxes, a ragdoll, a chain etc...
The scripting is very flexible and you can read in and connect different objects by joints, add sensors, add motor, add geometry, break joints etc...
In the pawn scripting, you can place force, torque, velocity etc...
Quite a lot of things start to work, but still a list of things that are not ready:
- Vehicle: got it finally working reasonable, but it's not flexible enough to build different cars, not scalable etc... => I'm now resolving this
- Player: the player can not (yet?) walk over physical bodies, nor he can "fly" together with a physical body
- Breaking multi-body physic geometry is not yet implemented, I started on this
- The same for collision callback, that is started on that
- Models are read as fixed geometry for physics, while it should be animated geometry. I need to find a way to read models and all the remaining brushes separate => I need help to get this solved
- I still have 1 issue in rotation: the Y-axis rotation is plus and minus 180d instead of 360d. I need help to get this solved
- Water is considered as a wall by the physics system. I need help to find out how I can detect that a model is "empty" => I need help to get this solved
Any support on the last itmes is more then welcome
- Sensors are implemented and working (For ray casting)
- Motors are implemented and working (For automatocally rotating something)
- 2 joints are implemented (hinge + ball/socket)
- You can extend physical bodies to create more complex shapes
- You can create a chain of boxes and "hang" it
- You can shoot the chain in parts
- You can shoot on bodies and they will fly around
- You can make an object to fall, bounce, lift, move, accellarate, rotate etc...
- You can script a lot of physics
eg, a wall of boxes, a ragdoll, a chain etc...
The scripting is very flexible and you can read in and connect different objects by joints, add sensors, add motor, add geometry, break joints etc...
In the pawn scripting, you can place force, torque, velocity etc...
Quite a lot of things start to work, but still a list of things that are not ready:
- Vehicle: got it finally working reasonable, but it's not flexible enough to build different cars, not scalable etc... => I'm now resolving this
- Player: the player can not (yet?) walk over physical bodies, nor he can "fly" together with a physical body
- Breaking multi-body physic geometry is not yet implemented, I started on this
- The same for collision callback, that is started on that
- Models are read as fixed geometry for physics, while it should be animated geometry. I need to find a way to read models and all the remaining brushes separate => I need help to get this solved
- I still have 1 issue in rotation: the Y-axis rotation is plus and minus 180d instead of 360d. I need help to get this solved
- Water is considered as a wall by the physics system. I need help to find out how I can detect that a model is "empty" => I need help to get this solved
Any support on the last itmes is more then welcome
The car sure has suspension, but today it's not yet well working. I need some more time to fine tune the code
Basically any joint can be programmed, as Tokamak allows callbacks for Joints (so you can define yourself what behaviour you want)
Without coding, using the physic entities, hinge and ball-in-socket are supported. Slider should be possible aswell, but did not try it out yet
Basically any joint can be programmed, as Tokamak allows callbacks for Joints (so you can define yourself what behaviour you want)
Without coding, using the physic entities, hinge and ball-in-socket are supported. Slider should be possible aswell, but did not try it out yet
The alpha release for RF with physics was uploaded
I'm not sure if it is accessable for others
QuestOfDreams, can you check this, and when needed make it accessable
The complete zip is quite big: 30MEG
It includes Docs, a compiled RF, the complete Tokamak engine with examples, tools etc..., 4 small RFphysics demo's and basic documentation for all new RF features, including physics
Please read the README.txt file first
I hope this will give you a better understanding on how Tokamak works together with RF
Once more, this is an APLHA release and it will sometimes crash
I'm not sure if it is accessable for others
QuestOfDreams, can you check this, and when needed make it accessable
The complete zip is quite big: 30MEG
It includes Docs, a compiled RF, the complete Tokamak engine with examples, tools etc..., 4 small RFphysics demo's and basic documentation for all new RF features, including physics
Please read the README.txt file first
I hope this will give you a better understanding on how Tokamak works together with RF
Once more, this is an APLHA release and it will sometimes crash