Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Proximity never seems to work for me

karmacomposer
Registered User
Quote
2018-08-30 21:00:46

I've been toying with the proximity behavior and it NEVER triggers.

I set the camera behavior to trigger on proximity to a second camera that is a bit higher up in the sky - the idea is that the third person camera clips a lot on the terrain and the sides of assets (like trees and buildings), so I could either move the camera or have a 2nd one that could automatically switch based on proximity.

Never worked

Then I tried a on proximity do something - and changed the animation when it neared a specific large asset.

Never worked.

How do you get proximity to actually work? It does not seem that hard - have a sphere with a radius of 10 - if it hits that radiii, do something - yet nothing fires off.

What, I wonder, am I doing wrong?

Mike


srfstudio
Registered User
Quote
2018-08-30 22:07:15

The oldest trick in 3D is to make a tree geometry not collide and just place a thin, transparent box in the middle with collision. That way, if you have 100 trees the engine will not have unnecessary calculations for entire tree-geometry, will render faster & player (camera) can actually go through the leaves which is more natural :)

I'm not sure why you're having problems with proximity. For my doors I use built-in behavior:
(My Door Object) > On Proximity > Near To Scene Node > Which Node: Player > Enter or Leaves. It works fine.


karmacomposer
Registered User
Quote
2018-08-30 22:10:15

In this case, it's for terrain - the third person camera is clipping when the character is walking on the terrain and a higher mountain is near.

I want the camera to rise above these higher areas and not clip.

Mike


just_in_case
Moderator
Quote
2018-08-31 06:55:24

if you have your object scaled a bit higher or lower.. or uneven scaling will cause this .....
as i don't know much about your scene i would recommend you to increase the proximity sphere or box and try again...


Ishmaru
Guest
Quote
2018-09-01 03:42:38

If your trying to detect proximity to a ground mesh then that doesn't work, as its only takes the node's bounding box into account, not the shape of the model.

The only way to do this is through the Javascript api, though honestly I don't fully understand how exactly its done. If i remember right in the extension js "Third Person Shooter Player" has ground detection for jumping implemented maybe you can look there?


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact