RayCasting working on MAC but not iPhone.

Hello,
I’ve been banging my head against a wall for the past couple of days now with this problem and I’m hoping someone can spread some light on what I’m doing wrong as I’m at a total lose now.

Basically, I’ve got my character running down a tube with random objects in the way which you have to avoid / pickup.
I’m using RayCasting to detect the objects (with each type been on a different layer) and for most of the time (90%) it seems to work fine (it seems to be perfect on the MAC).

The problem is that sometimes, it just totally misses collision hits. It’s not a speed thing as it detects hits when the player is moving faster and slower.

So far I’ve tried:
Increased the size of the collision mesh so there’s no way the player could run through the mesh without hitting it.
I’ve build the collision mesh in a 3D package and subdivided it (increasing the density of the collision model just in case that might make a difference from the in build Box Collider(it doesn’t)).
I’ve even made it so that the length of the RayCast grows longer the faster the player moves (speed is fixed and only increases with each new section) and I even RayCast out of the back of the player just incase I might of run past the collision mesh / box.
It’s the same prefabs that are used through out the game so I know the prefabs are ok and it seems to work fine when testing in Unity and like I’ve already said, it’s not pushing the iPhone at all, so I can’t see it been an issue with it pushing the hardware.

Does anyone have any ideas what else I can try as it’s a major problem for the game.

I’m also right in thinking that the RayCast picks up what ever crosses it (the beam), so as soon as the RayCast is broken, it returns a hit.

If anyone can provide any help it would be really appreciated as I’m getting really miffed at this now.

Thanks for reading,

Mike.

Solved
After trying half a dozen other different things, it ends up been (I guess) a timing issue.
I changed the main collision script to use FixedUpdate instead of just Update and it’s hitting everything that comes near it.
You live and learn I guess (joys of been a newbie I guess).
I can go to bed happy now instead of been a grumpy sod like I did last night.

Cheers,
Mike.