You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example the platform jitters whenever it gets close to being horizontal, usually giving the boxes a bump and sometimes causing them to explode.
The platform's jitter is quite visible when you look at the corners.
This appears to only affect bevy_xpbd_2d.
use bevy::prelude::*;use bevy_xpbd_2d::{math::*, prelude::*};fnmain(){App::new().insert_resource(Gravity(Vector::NEG_Y*1000.0)).add_plugins((DefaultPlugins,PhysicsPlugins::default(),PhysicsDebugPlugin::default(),)).add_systems(Startup, setup).add_systems(Update, rotate_platform).run();}#[derive(Component)]structPlatform;fnrotate_platform(mutplatform:Query<&mutTransform,With<Platform>>,time:Res<Time>){formut transform in&mut platform {
transform.rotation = Quat::from_rotation_z(time.elapsed_seconds().cos()*0.1);}}fnsetup(mutcommands:Commands){// Platform
commands.spawn((Platform,TransformBundle::from(Transform::from_xyz(0., -320.,0.)),RigidBody::Kinematic,Collider::cuboid(800.,40.),));// Boxesfor x in -3..4{for y in -2..4{
commands.spawn((TransformBundle::from(Transform::from_xyz(x asf32*101., y asf32*101.,0.)),RigidBody::Dynamic,Collider::cuboid(100.,100.),));}}
commands.spawn(Camera2dBundle::default());}
The text was updated successfully, but these errors were encountered:
In the following example the platform jitters whenever it gets close to being horizontal, usually giving the boxes a bump and sometimes causing them to explode.
The platform's jitter is quite visible when you look at the corners.
This appears to only affect
bevy_xpbd_2d
.The text was updated successfully, but these errors were encountered: