无法将sprite3D在rendertexture上渲染出来。。。cocos就不支持这样的操作吗?
没代码 没真相.
ocal function onTouchesMoved(touches, event)
local start = touches:getLocation()
local ended = touches:getPreviousLocation()
target:begin()
local distance = cc.pGetDistance(start, ended)
if distance > 1 then
-- brushes = {}
-- local d = distance
-- local i = 0
-- for i = 0,d -1 do
-- -- create a brush image to draw into the texture with
-- local sprite = cc.Sprite:create("Images/fire.png")
-- sprite:setColor(cc.c3b(255, 0, 0))
-- sprite:setOpacity(20)
-- brushes* = sprite
-- end
local rsprite = cc.Sprite3D:create("Sprite3DTest/girl.c3b")
rsprite:visit()
-- for i = 0,d -1 do
-- local difx = ended.x - start.x
-- local dify = ended.y - start.y
-- local delta = i / distance
-- brushes*:setPosition(cc.p(start.x + (difx * delta), start.y + (dify * delta)))
-- brushes*:setRotation(math.random(0, 359))
-- local r = math.random(0, 49) / 50.0 + 0.25
-- brushes*:setScale(r)
-- -- Use cc.RANDOM_0_1() will cause error when loading libtests.so on android, I don't know why.
-- brushes*:setColor(cc.c3b(math.random(0, 126) + 128, 255, 255))
-- -- Call visit to draw the brush, don't call draw..
-- brushes*:visit()
-- end
end
只是将官方的测试例子改一改就行了,,,sprite3D渲染不到rendertexture上的。。******
有没有人成功过,,,求指点
看了下render的代码,3.9版本是不行的貌似,在visitRenderQueue中,不同的render都被分开了。。。应该就是这个原因了。。。导致3D不能够被渲染到rendertexture上,,,貌似只能自己想办法重写个3D的rendertexture了。。。