University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Character avoiding boxes | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Character avoiding boxes
September 21, 2015
3:23 pm
Avatar
Member
Members
Forum Posts: 14
Member Since:
July 25, 2015
sp_UserOfflineSmall Offline

I'm maping pawn boxes on scene. Each time i move my charcater from one target to another he should avoid box don't pass them.
Someone can tell me what i'm doint wrong or if i forgot something (https://www.dropbox.com/s/1myjz5wk782x9c4/initSceneCharacter.py?dl=0)?

September 21, 2015
9:39 pm
Avatar
Admin
Forum Posts: 52
Member Since:
August 8, 2012
sp_UserOfflineSmall Offline

Hi,

I found a few problems in the initSceneCharacter.py script that would affect the steering :

1. You should use 'gridSizeZ' and 'numGridCellsZ' instead of 'gridSizeY' and 'numGridCellsY'. 

2. You should put a 'steerManager.stop()' and 'steerManager.start()' after you create the collision pawns. This would allow the steering engine to reset and update the collision objects in the scene.

3. You uses 'obj.setHPR(SrVec(0,0,90))' to rotate the collision pawn. The current SmartBody code didn't handle such rotation when the steering engine updating the collision object. Thus the size of collision object would be incorrect. You can either remove such rotation and set the collision box size explicitly, or you can update to the latest SmartBody, where I have fixed this issue.

After fixing the above issues, your init script tests fine on my computer. Let me know if this helps or if there are any questions.

Andrew

September 22, 2015
2:54 pm
Avatar
Member
Members
Forum Posts: 14
Member Since:
July 25, 2015
sp_UserOfflineSmall Offline

Thanks alot it's working well

March 31, 2017
9:27 am
Avatar
New Member
Members
Forum Posts: 1
Member Since:
March 31, 2017
sp_UserOfflineSmall Offline

pml87 said
I'm maping pawn boxes on scene. Each time i move my charcater from one target to another he should avoid box don't pass them.
Someone can tell me what i'm doint wrong or if i forgot something (https://www.dropbox.com/s/1myjz5wk782x9c4/initSceneCharacter.py?dl=0)?  

Hey can you please send me the python file? I am implementing the same function in C++ and facing the similar problem.

Forum Timezone: America/Los_Angeles

Top Posters:

jwwalker: 80

jyambao: 52

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 67

Members: 99543

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 458

Posts: 2401