BGE local space character movement is funky when add is checked #40682
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40682
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
MS Windows 7 Home Premium 64-bit SP1
NVIDIA GeForce GT 555M
Blender Version
Broken: 2.71 Release Candidate 2
a19c1be
Although it's been broken since at least 2.67.1 r57348
Short description of error
When motion actuator is set to local and add the the object moves when rotated on Z axis in weird ways (kind of hard to explain.)
Exact steps for others to reproduce the error
Start game engine
Use WASD to move and Q and E to rotate.
Once you rotate over 0° the direction you move is off. If you rotate around 180° your movement becomes very jerky.
local_add_move_bug.blend
Changed status to: 'Open'
Added subscriber: @JosephMasaki
Added subscriber: @brita
Added subscriber: @sreich
Hmm, the character controller actually rotates the object. I guess there's a problem there or maybe the walk direction is not calculated correctly. I'd start by looking at KX_ObjectActuator.cpp, lines 223-255.
In cases like this it would be good to have some sort of debug visualization. So we could draw things like the walk direction vector and see if it's pointing in the right direction.
I'm not sure how one would do that in the game engine.
Another thing that I noticed is that btKinematicCharacterController::setWalkDirection() can be called with a 0 vectror, but trying to normalize a 0 vector will assert. So there's also a bug here as well.
I will ask around for the debug visualization.
@sreich What do you suggest for correcting the call to btKinematicCharacterController::setWalkDirection() with a 0 vector?
Added subscriber: @Moguri
@brita that depends on whether walk direction is allowed to be 0 or not. If it can be zero just check for that and don't call normalize.
I'm not sure what's intendet here, maybe ask @Moguri?
I haven't looked much at this yet, but #34349 might be related.
Here is a patch that resets the walk direction every frame (if the feature is enabled). This helps to simplify the character motion actuator. It also gets rid of the automatic normalization to avoid the strange issues in #34349. While it would be a nice feature to have, it is awkward to implement. If users want better control over character physics, they should just use Python.
char_obj_act_fix.diff
As for a walk direction of 0, this is the only way I know of to actually stop a character from moving (short of resetting the whole character controller). So, I think this more a Bullet bug than a Blender bug.
Closed as duplicate of #36703