i want to draw on the texture in cocos3d with my finger on a iOS device. I have the world coordinates after a touch for the 3d scene, now i want to draw that texture pixel.
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in OPENGL-ES
- How can I use ARCore and OpenGL without Sceneform for making ar measurement app android?
- Unable to find GL_INT_2_10_10_10_REV define on Android GLES
- How to rotate model and view matrix with same angle?
- CameraX custom OpenGL Video Pipeline (`UseCase`/`VideoOutput`)
- How do I avoid leaking Graphics memory in OpenGL ES 2.0 in a background thread on Android?
- How to Create GPU SkImage in a Background Thread and Draw it on a Main SkSurface with OpenGL and Skia?
- glTexSubImage2D throws GL_INVALID_OPERATION in OpenGL ES 3.2 on Android NDK with FreeType
- What are the rules for the precision of casting operations in GLSL
- Why would a OpenGL ES 2.0 leak graphics memory on Android, but not iOS with the same code
- Create a VideoFrame from Canvas
- GLES30 Ray Picking gluUnProject
- OpenGL lighting works incorrectly on Android and WebAssembly
- WebGL: this extension has very low support on mobile devices
- OpenGL ES 3.0 - Textures black
- OpenGL-glGetUniformLocation failed
Related Questions in PAINT
- Java Swing Paint Performance
- Allow users to resize into negative height / width
- How to use CSS Paint API with React
- Paint-like a pp on Unity too slow
- Performance issues on Chrome when painting many characters at 80-130px font-size range
- How to changes the brush width
- PaintSurfaceView crash
- Color dialog causing an issue when used in a property grid
- Mac Paint Pro .paint file with layers to open in photoshop or other software
- painted a cell pressing button VBA EXCEL
- Creating an Erasor in a PaintApp between 2 Graphics
- I want to create a simple Paint in Java
- how to draw a rectangle from the center in PyQt6?
- How do I draw an Image into a panel?
- How to recognize Surface Pro Pen in flutter dektop application
Related Questions in COCOS3D
- Xcode12 compile error against Cocos3D: Incompatible block pointer types
- Building a Cocos2d-x project with android : "package org.apache.http does not exist"
- cocos2d-x: why are there gaps in my 3d model?
- How to correctly display 3d model in Cocos3d using makehuman, blender and PVRShaman?
- Error cocos3d + Storyboard?
- Set texture to colored CC3MeshNode
- Cocos3d Changing face color
- Fit and rotate two 3D mesh nodes in parallel
- Vertices exceeded max allowed by OpenGL ES
- How do I add a 2D sprite animation to a cocos3D scene?
- Cocos3D: Invoke delegate method from CC3Scene
- clang Error adding Pods to existing Cocos3D project
- Cocos3D - Take various screenshots in the background
- How to create cube with rounded corners in cocos3d
- Cocos3D - background shown through meshes
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You should be able to do that as follows:
Once your
CC3MeshNodehas been touched, in your implementation ofnodeSelected:byTouchEvent:at:, you can create a ray from the touch point:Then, convert the ray to the local coordinates of your mesh node:
Then, you can use the
findFirst:intersections:ofLocalRay:acceptBackFaces:acceptBehindRay:method of your node to find exactly where the ray intersects the mesh. Or, if you don’t need the intersection location in local coordinates, you can use thefindFirst:globalIntersections:ofGlobalRay:acceptBackFaces:acceptBehindRay:method instead, and skip the step above that converts the ray to local coordinates (the line above using transformRay:).Either way, the returned
CC3MeshIntersectionstructures provide a lot of info about the mesh intersection, including the index of the mesh face that was intersected, and the location within that face of the intersection.Using the face index, you can retrieve the indices of each of the 3 vertices that make up the face, by using the
faceIndicesAt:method of your mesh node.Once you have the indices of the vertices you’re interested in, you can then use
vertexTexCoord2FAt:to retrieve the texture coordinates, andsetVertexTexCoord2F:at:to modify them, if you want.Or, you might add color vertex attributes (ie- a color attribute for each vertex, in addition to a texture coordinate, normal, and location), and then use the
setVertexColor4F:at:method to assign a color to the vertices that you are "painting" with your finger. That way, the same texture will show through, but will be tinted to a different color on the vertices that have been touched.