Sensor physics mode- missing UI option #30515

Closed
opened 2012-03-11 06:20:17 +01:00 by Adrian Winchell · 9 comments

%%%The "Sensor" physics mode in BGE uses the "use_actor" property to determine whether to filter for actor collisions, or to accept any collision.
The UI option to toggle it is missing from the Physics tab > physics rollout in BGE.
Turning it on from the python console, or by adding a control for it to properties_game.py works as expected.

This option was present in Blender 2.4x but is missing in Blender 2.62, though the wikidocs still list it.
( http://wiki.blender.org/index.php/Doc:2.4/Manual/Game_Engine/Physics/Object_Type/Sensor )
( http://wiki.blender.org/index.php/Doc:2.6/Manual/Game_Engine/Physics/Object_Type/Sensor )%%%

%%%The "Sensor" physics mode in BGE uses the "use_actor" property to determine whether to filter for actor collisions, or to accept any collision. The UI option to toggle it is missing from the Physics tab > physics rollout in BGE. Turning it on from the python console, or by adding a control for it to properties_game.py works as expected. This option was present in Blender 2.4x but is missing in Blender 2.62, though the wikidocs still list it. ( http://wiki.blender.org/index.php/Doc:2.4/Manual/Game_Engine/Physics/Object_Type/Sensor ) ( http://wiki.blender.org/index.php/Doc:2.6/Manual/Game_Engine/Physics/Object_Type/Sensor )%%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%What button exactly is missing? I am confused...%%%

%%%What button exactly is missing? I am confused...%%%

%%%"Detect Actor".

In sensor objects (physics mode: sensor), the OB_ACTOR RNA property ("use_actor" in python) is overloaded to mean whether the sensor reacts to any collisions, or just to actor objects. ( source\gameengine\Ketsji\KX_ConvertPhysicsObjects.cpp - lines 486-488 )

So release/scripts/startup/bl_ui/properties_game.py needs to have an option for physics_type=='SENSOR' that includes col.prop(game, "use_actor", text="Detect Actor")

It needs different text since in this case, the use_actor setting is doing something different (determining whether or not the sensor is doing broadphase filtering for actors)

Like so:

- C:/DOCUME~1/Snapai/LOCALS~1/Temp/properties_game-revBASE.svn003.tmp.py	Wed Mar 14 20:27:53 2012

+++ C:/Documents and Settings/Snapai/Desktop/blender_release/scripts/startup/bl_ui/properties_game.py Wed Mar 14 20:26:40 2012
@@ -165,7 +165,12 @@

           subsub.active = game.use_anisotropic_friction
           subsub.prop(game, "friction_coefficients", text="", slider=True)
  • elif physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
  •    elif physics_type =='SENSOR':
    
  •        col = layout.column()
    
  •        col.prop(game, "use_actor", text="Detect Actors")
    
  •        col.prop(ob, "hide_render", text="Invisible")
    
  •    elif physics_type in {'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
    
           layout.prop(ob, "hide_render", text="Invisible")
       elif physics_type == 'NAVMESH':

%%%

%%%"Detect Actor". In sensor objects (physics mode: sensor), the OB_ACTOR RNA property ("use_actor" in python) is overloaded to mean whether the sensor reacts to *any* collisions, or just to actor objects. ( source\gameengine\Ketsji\KX_ConvertPhysicsObjects.cpp - lines 486-488 ) So release/scripts/startup/bl_ui/properties_game.py needs to have an option for physics_type=='SENSOR' that includes col.prop(game, "use_actor", text="Detect Actor") It needs different text since in this case, the use_actor setting is doing something different (determining whether or not the sensor is doing broadphase filtering for actors) Like so: - C:/DOCUME~1/Snapai/LOCALS~1/Temp/properties_game-revBASE.svn003.tmp.py Wed Mar 14 20:27:53 2012 +++ C:/Documents and Settings/Snapai/Desktop/blender_release/scripts/startup/bl_ui/properties_game.py Wed Mar 14 20:26:40 2012 @@ -165,7 +165,12 @@ ``` subsub.active = game.use_anisotropic_friction subsub.prop(game, "friction_coefficients", text="", slider=True) ``` - elif physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}: + elif physics_type =='SENSOR': + col = layout.column() + col.prop(game, "use_actor", text="Detect Actors") + col.prop(ob, "hide_render", text="Invisible") + + elif physics_type in {'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}: ``` layout.prop(ob, "hide_render", text="Invisible") ``` ``` elif physics_type == 'NAVMESH': ``` %%%

%%%(attachment)%%%

%%%(attachment)%%%

%%%Okay, attaching the diff as a file didn't work, but its entire text is in my previous comment. :P%%%

%%%Okay, attaching the diff as a file didn't work, but its entire text is in my previous comment. :P%%%

%%%Oh nevermind, there it is. Sorry for the extra comments. :)%%%

%%%Oh nevermind, there it is. Sorry for the extra comments. :)%%%

%%%Assigning to Benoit to look over the patch.%%%

%%%Assigning to Benoit to look over the patch.%%%
Member

%%%Committed in revision 45656.
Thanks for the patch.%%%

%%%Committed in revision 45656. Thanks for the patch.%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#30515
No description provided.