Coder Social home page Coder Social logo

Comments (6)

valyard avatar valyard commented on July 19, 2024

No, this data is immutable in current architecture.
Are you trying to manually create touch points or change current ones?
If the first case just create a new Input like MouseInput for example.

from touchscript.

paynechu avatar paynechu commented on July 19, 2024

understand now ~ instead of inherit from TouchLayer ~ I changed to inherit from CameraLayer~
so I just need to override the Hit function.~ thanks

from touchscript.

valyard avatar valyard commented on July 19, 2024

Can you describe what you are trying to do? Maybe there's a better way.

from touchscript.

paynechu avatar paynechu commented on July 19, 2024

Im using MetaGestures to control my player character. But when the Monster overlapped on top of the player character. the MetaGestures touchBegin will not trigger. just because the Monster got the RayHit. I know HitTest can disable the monster to be selected. But a bit annoying if I need to set all Monster to have HitTest and set to false. Instead of that the easy way is try to RayHit to limited layer for example in my case just need to RayHit to player layer. That can help to fix the problem. Since your CameraLayer using RaycastAll and without setting the layerMask. I need to override the Hit method to implement my own Hit method by passing layerMask to Rasycast. so if you allow us to set the layerMask in the CameraLayer and pass to Raycast is more simple and direct. But for now override it also a solution.

from touchscript.

valyard avatar valyard commented on July 19, 2024

CameraLayers are placed on cameras.
What would be better in your approach to have a custom layerMask in CameraLayer or if CameraLayer inherited layerMask from Camera it uses?

from touchscript.

valyard avatar valyard commented on July 19, 2024

Added LayerMask to CameraLayer in 2.0.

from touchscript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.