1) Anisotropic friction works for static and dynamic objects
2) For soft bodies, assume triangle mesh if no bounds a chosen
3) Form factor == inertia scaling factor, it was actually hooked up in Bullet
4) Only show 'radius' if sphere is chosen, or no bounds+dynamics (== sphere bounds)
add -nojoystick commandline option: it takes 5 seconds everytime to start the game engine, while there IS no joystick.
In other words: blender -noaudio -nojoystick improves workflow turnaround times for P - ESC from 7 seconds to 1 second!
Improved Bullet soft body advanced options, still work-in-progress. Make sure to create game Bullet soft bodies from scratch, it is not compatible with last weeks builds.
Previously the distance constraint actuator was always working
in local axis. The local flag allows to cast the ray along a
world axis (when the flag is not selected).
The N flag works differently in this case: only the object
orientation is changed to be parallel to the normal at the hit
point.
The linear velocity is now changed so that the speed along the
ray axis is null. This eliminates the need to compensate the
gravity when casting along the Z axis.
Added Bullet/Gimpact concave collision detection to Blender. If your build system isn't updated yet, please add extern/bullet2/src/BulletCollision/Gimpact/*
This allows moving/dynamic concave triangle meshes (decomposing meshes into compound convex shapes, and using 'compound' shapes is still preferred)
set a fake world transform for game soft bodies, based on center of the AABB, so visiblity and some game logic works. note: this world transform is not smooth.
from Dalai Felinto (dfelinto)
would useually not encourage prints in these cases, except its often useful to know if an error happened since you last pressed Pkey and without this you end up needing to manually clear the terminal.
This problem is caused by discontinuities in the conversion
orientation matrix -> euler angles: the angle sign can
switch and thus the direction of the rotation produced
by the dRot Ipo.
To avoid this bug, the matrix->euler conversion must be
avoided during the game. I took the following approach that
is compatible with Blender (identical effect in the game and
in the 3D view):
- no change in Add mode: Rot and dRot are treated as additional
rotation to the orientation at the start of the Ipo. There is
no matrix->euler conversion and thus no discontinuities.
- Rot Ipo are treated as absolute rotation. All 3 axis should
be specified but if they are not, the startup object orientation
will be used to set the unspecified axis. By doing a matrix->
euler conversion once at the start, the discontinuities are
avoided. If there are also dRot curves, they are treated as
delta of the corresponding Rot curve or startup angle.
- dRot Ipo are treated as Add mode in Local axis.
Note about Add mode: Rot and dRot curves are treated identically
during the game. However, only dRot curves make sense because
they don't interfere with the object orientation in the 3D view.
The constants KX_STATE1 to KX_STATE30 can be used
with setState() to change the object state in a
python controller. The constants are defined in the
GameLogic module so that the full name is
GameLogic.KX_STATE1 to GameLogic.KX_STATE30 but you
can simplify this with the import statement:
from GameLogic import *
cont = getCurrentController()
ob = cont.getOwner()
ob.setState(KX_STATE2) #go to state 2
KX_STATEx constants are defined as (1<<(x-1))
Binary operators |, &, ^ and ~ can be used to combine states:
You can activate more than one state at a time with the | operator:
ob.setState(KX_STATE1|KX_STATE2) #activate state 1 and 2, stop all others
You can add a state to the current state mask with:
state = ob.getState()
ob.setState(state|KX_STATE3) #activate state 3, keep others
You can substract a state to the current state mask with the & and operator:
state = ob.getState()
ob.setState(state&~KX_STATE2) #stop state 2, keep others
You can invert a state with the ^ operator:
state = ob.getState()
ob.setState(state^KX_STATE2) #invert state 2, keep others
Three features that were on the main UI interface are now
moved to the Advanced Settings panel:
Margin, Actor (that becomes Sensor Actor) and No sleeping.
Sensor Actor is now a feature: it can be turned on and off
for all types of objects, and not just static objects.
Select the Sensor Actor button to make the object visible
to Near and Radar sensor.
The button is selected by default for dynamic objects
and unselected by default for static objects, to match
previous behavior.
correct if there was more than one camera. It shoots rays from the
active camera, but used the viewport from whichever camera was drawn
last, now it uses the correct vieport.
but don't have an action got the pose of already added armatures, even
though they're not related. This also fixes an issue where the armature
in Blender would end up in the pose from the game after ESC, removes
unneeded copies made during armature evaluation, and also solves the
constraint copying hack.
possible to change the visibility again through python for example.
This is because the actuator kept setting the visibility again each
frame, as a workaround for there being no separate visible and
viewport culling flag, but that was added some time ago.
when pressing P without a camera active, now it should match
the view exactly.
Fix an issue when setting a camera with an actuator and being
in orthographic mode in the viewport without an active camera,
it used a strange mix of the set camera and the viewport then.